using Tower.Object;
using Spine;


namespace Tower.State
{
    public class StateHumen : StateBase
    {
        protected string m_strAnimName;
        protected TrackEntry m_TrackEntry;

        public TrackEntry PlayAnim(bool bLoop = false)
        {
            return Humen.DoPlayAnim(m_strAnimName, bLoop);
        }
        protected ObjectHumen Humen
        {
            get
            {
                return Owner as ObjectHumen;
            }
        }

        public void OnAnimationComplete(TrackEntry trackEntry)
        {

        }

        public virtual float GetAnimateSpeed()
        {
            return 1;
        }
        public virtual void OnPause(bool value)
        {
            if (m_TrackEntry != null)
                m_TrackEntry.TimeScale = value ? 0 : GetAnimateSpeed();
        }

 
    }

}